package com.salt.modules.sys.feign;

import com.salt.common.constant.Common;
import com.salt.core.web.BaseController;
import com.salt.modules.sys.entity.Menu;
import com.salt.modules.sys.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description
 * @Author salt
 * @Date 2020/7/30 11:26
 * @Version 1.0
 */
@RestController
@RequestMapping(Common.Service.SALT_ADMIN_MENU_URL_PREFIX)
public class MenuFeignController extends BaseController{

    @Autowired
    private MenuService menuService;

    @PostMapping("save")
    public void saveMenu(Menu menu){
        menuService.saveMenu(menu);
    }

    @GetMapping("findAll")
    public List<Menu> findAllMenu(){
        return menuService.findAllMenu(new Menu());
    }
}
